import $http from '@/ajax/http.js';

export const index_store = {
	data() {
		return {
			token:'',
			roles:'',
			vipnum:''
		}
	},

	onLoad(options) {
		this.roles = wx.getStorageSync('roles')
		console.log(this.roles,"this.roles");
		this.token = wx.getStorageSync('token');
		if(this.roles == 6){
			this.init();
		}
	},
	methods:{
		init(){
			$http.request({
				header: {
					Authorization: this.token,
				},
				url:"/store/index/sumMemberCount",
				method: 'POST',
			}).then((res)=>{
				this.vipnum = res
				console.log(res,"res会员人数");
			})
		}
	}

}